use 5.012;
use warnings;

use Perl::Dist::Strawberry;
use Perl::Dist::Strawberry::Step::OutputMSM_MSI;

my $b = Perl::Dist::Strawberry->new(
  app_fullname        => "Str AAAA",
  app_simplename      => "str-AAAA",
  app_version         => "5.14.2.1",
  beta                => 0,
  bits                => 32,
  build_dir           => "C:\\strawberry_build\\build",
  build_ENV           => {
                           APPDATA           => "C:\\strawberry_build\\env\\AppDataRoaming",
                           COMPUTERNAME      => "buildmachine",
                           HOMEDRIVE         => "C:",
                           HOMEPATH          => "\\strawberry_build\\env\\home\\",
                           INCLUDE           => undef,
                           LIB               => undef,
                           LOCALAPPDATA      => "C:\\strawberry_build\\env\\AppDataLocal",
                           PATH              => "C:\\strawberry\\perl\\site\\bin;C:\\strawberry\\perl\\bin;C:\\strawberry\\c\\bin;C:\\Windows\\system32;C:\\Windows",
                           PERL5DB           => undef,
                           PERL5LIB          => undef,
                           PERL5OPT          => undef,
                           PERL5SHELL        => undef,
                           PERL_JSON_BACKEND => undef,
                           PERL_MB_OPT       => undef,
                           PERL_MM_OPT       => undef,
                           PERL_YAML_BACKEND => undef,
                           PERLLIB           => undef,
                           TEMP              => "C:\\strawberry_build\\env\\temp",
                           TERM              => "dumb",
                           TMP               => "C:\\strawberry_build\\env\\temp",
                           USERNAME          => "builduser",
                           USERPROFILE       => "C:\\strawberry_build\\env\\UserProfile",
                         },
  cpan_url            => "file://z:/strawberry_build/_cpan-mirror/",
  debug_dir           => "C:\\strawberry_build\\debug",
  dist_sharedir       => 'z:\strawberry_build\SVN_Perl-Dist-Strawberry\share',
  download_dir        => "C:\\strawberry_build\\download",
  env_dir             => "C:\\strawberry_build\\env",
  fragments_dir       => "C:\\strawberry_build\\fragments",
  image_dir           => "C:\\strawAAAA",
  image_dir_quotemeta => "c:\\\\strawAAAA",
  image_dir_url       => "file:///c:/strawAAAA",
  interactive         => 1,
  job                 => "share\\64bits-5.14.2.1.pp",
  offline             => 0,
  output              => {
                           distributions => [
                                              "App-Cpan-1.58",
                                              "Archive-Extract-0.60",
                                              "Archive-Tar-1.84",
                                              "Attribute-Handlers-0.93",
                                              "autodie-2.11",
                                              "AutoLoader-5.72",
                                              "B-Debug-1.17",
                                              "base-2.18",
                                              "bignum-0.29",
                                              "Carp-1.25",
                                              "CGI.pm-3.59",
                                              "Compress-Raw-Bzip2-2.049",
                                              "Compress-Raw-Zlib-2.051",
                                              "CPAN-1.9800",
                                              "CPAN-Meta-2.120921",
                                              "CPAN-Meta-Requirements-2.121",
                                              "CPAN-Meta-YAML-0.008",
                                              "CPANPLUS-0.9124",
                                              "CPANPLUS-Dist-Build-0.62",
                                              "Data-Dumper-2.131",
                                              "Devel-DProf-20110802.00",
                                              "Devel-PPPort-3.20",
                                              "Digest-1.17",
                                              "Digest-SHA-5.71",
                                              "Encode-2.44",
                                              "Env-1.03",
                                              "Exporter-5.66",
                                              "ExtUtils-CBuilder-0.280205",
                                              "ExtUtils-MakeMaker-6.62",
                                              "ExtUtils-Manifest-1.60",
                                              "ExtUtils-ParseXS-3.15",
                                              "FCGI-0.74",
                                              "File-Fetch-0.34",
                                              "Filter-1.43",
                                              "Filter-Simple-0.88",
                                              "HTTP-Tiny-0.018",
                                              "IO-Compress-2.049",
                                              "IPC-Cmd-0.76",
                                              "JSON-PP-2.27200",
                                              "Locale-Codes-3.21",
                                              "Locale-Maketext-1.22",
                                              "Math-BigInt-1.997",
                                              "Math-BigInt-FastCalc-0.30",
                                              "Math-BigRat-0.2602",
                                              "Math-Complex-1.59",
                                              "Memoize-1.03",
                                              "Module-Build-0.40",
                                              "Module-CoreList-2.65",
                                              "Module-Load-0.22",
                                              "Module-Load-Conditional-0.48",
                                              "Module-Loaded-0.08",
                                              "Module-Metadata-1.000009",
                                              "Module-Pluggable-4.0",
                                              "Object-Accessor-0.42",
                                              "Params-Check-0.32",
                                              "Parse-CPAN-Meta-1.4404",
                                              "PerlIO-via-QuotedPrint-0.07",
                                              "Pod-LaTeX-0.60",
                                              "Pod-Parser-1.51",
                                              "Pod-Perldoc-3.17",
                                              "Pod-Simple-3.20",
                                              "Safe-2.33",
                                              "Scalar-List-Utils-1.25",
                                              "Search-Dict-1.07",
                                              "SelfLoader-1.20",
                                              "Socket-2.001",
                                              "Storable-2.30",
                                              "Term-ANSIColor-3.02",
                                              "Term-ReadLine-1.09",
                                              "Term-UI-0.30",
                                              "threads-1.86",
                                              "threads-shared-1.40",
                                              "Tie-File-0.98",
                                              "Time-HiRes-1.9725",
                                              "Unicode-Collate-0.89",
                                              "Unicode-Normalize-1.14",
                                              "version-0.97",
                                              "Win32API-File-0.1200",
                                              "XSLoader-0.15",
                                              "Algorithm-Diff-1.1902",
                                              "Alien-Tidyp-v1.4.7",
                                              "App-local-lib-Win32Helper-0.990",
                                              "App-module-version-1.003",
                                              "Archive-Zip-1.30",
                                              "BerkeleyDB-0.51",
                                              "Capture-Tiny-0.17",
                                              "Class-ErrorHandler-0.01",
                                              "Class-Inspector-1.27",
                                              "Class-Loader-2.03",
                                              "common-sense-3.5",
                                              "Compress-Bzip2-2.09",
                                              "Compress-Raw-Lzma-2.049",
                                              "Compress-unLZMA-0.04",
                                              "Convert-ASCII-Armour-1.4",
                                              "Convert-ASN1-0.22",
                                              "Convert-PEM-0.08",
                                              "CPAN-Checksums-2.08",
                                              "CPAN-DistnameInfo-0.12",
                                              "CPAN-Inject-1.13",
                                              "CPAN-SQLite-0.202",
                                              "Crypt-Blowfish-2.12_patched",
                                              "Crypt-CAST5_PP-1.04",
                                              "Crypt-CBC-2.30",
                                              "Crypt-DES-2.05",
                                              "Crypt-DES_EDE3-0.01",
                                              "Crypt-DH-0.06",
                                              "Crypt-DSA-1.17",
                                              "Crypt-IDEA-1.08_patched",
                                              "Crypt-Rijndael-1.09",
                                              "Crypt-RIPEMD160-0.05",
                                              "Crypt-SSLeay-0.58",
                                              "Crypt-Twofish-2.14",
                                              "Data-Buffer-0.04",
                                              "Data-Compare-1.22",
                                              "Data-Random-0.06",
                                              "DB_File-1.826",
                                              "DBD-ADO-2.99",
                                              "DBD-mysql-4.020_patched_h",
                                              "DBD-ODBC-1.37",
                                              "DBD-Pg-2.19.2",
                                              "DBD-SQLite-1.35",
                                              "DBI-1.618",
                                              "DBIx-Simple-1.35",
                                              "DBM-Deep-2.0006",
                                              "Digest-BubbleBabble-0.02",
                                              "Digest-HMAC-1.03",
                                              "Digest-MD2-2.03",
                                              "Digest-SHA1-2.13",
                                              "Encode-Locale-1.03",
                                              "File-chmod-0.32",
                                              "File-Find-Rule-0.33",
                                              "File-HomeDir-0.99",
                                              "File-Listing-6.04",
                                              "File-pushd-1.002",
                                              "File-Remove-1.52",
                                              "File-ShareDir-1.03",
                                              "File-Slurp-9999.19",
                                              "File-Which-1.09",
                                              "GD-2.46_patched",
                                              "HTML-Parser-3.69",
                                              "HTML-Tagset-3.20",
                                              "HTTP-Cookies-6.01",
                                              "HTTP-Daemon-6.01",
                                              "HTTP-Date-6.02",
                                              "HTTP-Message-6.03",
                                              "HTTP-Negotiate-6.01",
                                              "Imager-0.89",
                                              "IO-Compress-Lzma-2.049",
                                              "IO-Interactive-0.0.6",
                                              "IO-Socket-SSL-1.66",
                                              "IO-String-1.08",
                                              "IO-stringy-2.110",
                                              "IPC-Run-0.91",
                                              "IPC-Run3-0.045",
                                              "IPC-System-Simple-1.21",
                                              "JSON-2.53",
                                              "JSON-XS-2.32",
                                              "libwww-perl-6.04",
                                              "local-lib-1.008004",
                                              "LWP-MediaTypes-6.02",
                                              "LWP-Online-1.08",
                                              "LWP-Protocol-https-6.03",
                                              "Math-BigInt-GMP-1.37",
                                              "Math-GMP-2.06",
                                              "Math-MPC-0.93",
                                              "Math-MPFR-3.12",
                                              "Mozilla-CA-20120309",
                                              "Net-HTTP-6.03",
                                              "Net-SMTP-TLS-0.12",
                                              "Net-SSH2-0.42",
                                              "Net-SSLeay-1.47",
                                              "Number-Compare-0.03",
                                              "PAR-1.005",
                                              "PAR-Dist-0.48",
                                              "PAR-Dist-FromPPD-0.03",
                                              "PAR-Dist-InstallPPD-0.02",
                                              "PAR-Repository-Client-0.25",
                                              "PAR-Repository-Query-0.14",
                                              "Params-Util-1.07",
                                              "Parse-Binary-0.11",
                                              "pip-1.19",
                                              "pler-1.06",
                                              "Probe-Perl-0.01",
                                              "SOAP-Lite-0.714",
                                              "Sort-Versions-1.5",
                                              "String-CRC32-1.4",
                                              "Sub-Uplevel-0.24",
                                              "Task-Weaken-1.04",
                                              "Term-ReadLine-Perl-1.0303",
                                              "TermReadKey-2.30.02",
                                              "Test-Deep-0.109",
                                              "Test-Exception-0.31",
                                              "Test-Manifest-1.23",
                                              "Test-NoWarnings-1.04",
                                              "Test-Script-1.07",
                                              "Test-Tester-0.108",
                                              "Test-Warn-0.24",
                                              "Text-Diff-1.41",
                                              "Text-Glob-0.09",
                                              "Tie-EncryptedHash-1.24",
                                              "Tree-DAG_Node-1.06",
                                              "URI-1.60",
                                              "Win32-API-0.68",
                                              "Win32-EventLog-0.076",
                                              "Win32-Exe-0.17",
                                              "Win32-File-0.06",
                                              "Win32-File-Object-0.02",
                                              "Win32-OLE-0.1709",
                                              "Win32-Process-0.14",
                                              "Win32-TieRegistry-0.26",
                                              "Win32-UTCFileTime-1.55",
                                              "Win32-WinError-0.03",
                                              "Win32API-Registry-0.32",
                                              "WWW-RobotRules-6.02",
                                              "XML-LibXML-1.96",
                                              "XML-LibXSLT-1.77",
                                              "XML-NamespaceSupport-1.11",
                                              "XML-Parser-2.41",
                                              "XML-SAX-0.99",
                                              "XML-SAX-Base-1.08",
                                              "XML-Simple-2.18",
                                              "YAML-0.81",
                                              "YAML-Tiny-1.51",
                                            ],
                           perl_version  => "5.14.2",
                         },
  output_basename     => "str-XXX",
  output_dir          => "C:\\strawberry_build\\output",
  package_url         => "http://strawberryperl.com/package/",
  perl_debug          => 0,
  restore_dir         => "C:\\strawberry_build\\restore",
  restorepoints       => 1,
  smoketest           => 0,
  target              => "msi+zip+portable",
  test_core           => 0,
  test_modules        => 1,
  verbosity           => 3,
  working_dir         => "C:\\strawberry_build",
);

my $m = Perl::Dist::Strawberry::Step::OutputMSM_MSI->new(
  boss=>$b,
  candle_exe=> 'z:\strawberry_build\Wix35\candle.exe',
  light_exe=> 'z:\strawberry_build\Wix35\light.exe',
  config=>{
       exclude  => [ # do not include neither to MSM nor to MSI
           #'dirname\subdir1\subdir2',
           #'dirname\file.pm',
           'relocation.pl.bat',
           'update_env.pl.bat',
       ],
       exclude_msm => [ # do not include these to MSM but to MSI
           #qr/^win32\\.*?\.url$/,
           'win32',
           'perl2.reloc.txt',
           'README.txt'
       ],
       msi_upgrade_code    => 'DBA41113-4E91-3FFC-B400-573BB4B80705',
       app_publisher       => 'strawberryperl.com project',
       url_about           => 'http://strawberryperl.com/',
       url_help            => 'http://strawberryperl.com/support.html',
       msi_default_instdir => 'c:\XXXYYY',
       msi_main_icon       => '<dist_sharedir>\msi\files\strawberry.ico',
       msi_license_rtf     => '<dist_sharedir>\msi\files\License-short.rtf',
       msi_dialog_bmp      => '<dist_sharedir>\msi\files\StrawberryDialog.bmp',
       msi_banner_bmp      => '<dist_sharedir>\msi\files\StrawberryBanner.bmp',
       msi_debug           => 1,

       start_menu => [ # if "description" is missing it will be set to the same value as "name"
         { type=>'shortcut', name=>'Perl (command line)', icon=>'<dist_sharedir>\msi\files\perlexe.ico', description=>'Quick way to get to the command line in order to use Perl', target=>'[SystemFolder]cmd.exe', workingdir=>'PersonalFolder' },
         { type=>'shortcut', name=>'Strawberry Perl Release Notes', icon=>'<dist_sharedir>\msi\files\strawberry.ico', target=>'[d_win32]Strawberry Perl Release Notes.url', workingdir=>'d_win32' },
         { type=>'shortcut', name=>'Strawberry Perl README', target=>'[INSTALLDIR]README.txt', workingdir=>'INSTALLDIR' },
         { type=>'folder',   name=>'Tools', members=>[
              { type=>'shortcut', name=>'CPAN Client', icon=>'<dist_sharedir>\msi\files\cpan.ico', target=>'[d_perl_bin.<MSMID>]cpan.bat', workingdir=>'d_perl_bin.<MSMID>' },
              { type=>'shortcut', name=>'Create local library areas', icon=>'<dist_sharedir>\msi\files\strawberry.ico', target=>'[d_perl_bin.<MSMID>]llw32helper.bat', workingdir=>'d_perl_bin.<MSMID>' },
         ] },
         { type=>'folder', name=>'Related Websites', members=>[
              { type=>'shortcut', name=>'CPAN Module Search', icon=>'<dist_sharedir>\msi\files\cpan.ico', target=>'[d_win32]CPAN Module Search.url', workingdir=>'d_win32' },
              { type=>'shortcut', name=>'Perl 5.14 Documentation', icon=>'<dist_sharedir>\msi\files\perldoc.ico', target=>'[d_win32]Perl 5.14 Documentation.url', workingdir=>'d_win32' },
              { type=>'shortcut', name=>'Win32 Perl Wiki', icon=>'<dist_sharedir>\msi\files\strawberry.ico', target=>'[d_win32]Win32 Perl Wiki.url', workingdir=>'d_win32' },
              { type=>'shortcut', name=>'Strawberry Perl Website', icon=>'<dist_sharedir>\msi\files\strawberry.ico', target=>'[d_win32]Strawberry Perl Website.url', workingdir=>'d_win32' },
              { type=>'shortcut', name=>'Learning Perl (tutorials, examples)', icon=>'<dist_sharedir>\msi\files\perldoc.ico', target=>'[d_win32]Learning Perl (tutorials, examples).url', workingdir=>'d_win32' },
              { type=>'shortcut', name=>'Live Support (chat)', icon=>'<dist_sharedir>\msi\files\onion.ico', target=>'[d_win32]Live Support (chat).url', workingdir=>'d_win32' },
         ] },       
       ],
       env => {
         TERM => "dumb",
         PERL_YAML_BACKEND => "YAML",
         PERL_JSON_BACKEND => "JSON::XS",
       },

    }
);

$b->global->{app_version} = '5.13.7.9';
$m->run;
exit;
$b->global->{app_version} = '5.14.2.1';
$m->run;
$b->global->{app_version} = '5.14.2.3';
$m->run;
